import request from '@/utils/request'

// 删除素材信息
export function sourceDelete(data) {
  return request({
    url: '/commodity/delete',
    method: 'post',
    data
  })
}

// 新增素材信息
export function sourceInsert(data) {
  return request({
    url: '/commodity/insert',
    method: 'post',
    data
  })
}

// 修改素材信息
export function sourceUpdate(data) {
  return request({
    url: '/commodity/update',
    method: 'post',
    data
  })
}
// 查询规格信息
export function getQuerySpecsList(params) {
  return request({
    url: '/commodity/querySpecsList',
    method: 'get',
    params: params
  })
}

// 获取素材列表
export function getSourceMaterialList(params) {
  return request({
    url: '/commodity/getSourceMaterialList',
    method: 'get',
    params: params
  })
}

// 批量给一个商家划分素材
export function batchInsertCommodity(data) {
  return request({
    url: '/commodity/batchInsertCommodity',
    method: 'post',
    data
  })
}
